package com.example.java.base.concurrency.threadpool;

import com.example.java.base.concurrency.threadpool.task.DemoTask;
import com.example.java.base.concurrency.threadpool.task.ExecutorTask;

/**
 * ForLoop:手动创建多个线程示例2(不合理)
 *
 * @author zhangxiaoxiang
 * @date 2020/11/5
 */
public class A2ForLoop {

    public static void main(String[] args) {
        for (int i = 0; i < 1000; i++) {
            //这里显示的创建线程
            Thread thread = new Thread(new DemoTask());
            //调用线程执行任务
            thread.start();
        }
    }


}
